﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="keywords" content="jQuery Button, CheckBox, Toggle Button, Repeat Button, Radio Button, Link Button, Button" />
    <meta name="description" content="With the jqxRadioButton, users make a choice among a set of mutually exclusive, related options. Users can choose one and only one option." />
    <title id='Description'>With the jqxRadioButton, users make a choice among a set of
        mutually exclusive, related options. Users can choose one and only one option.
    </title>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/gettheme.js"></script>
    <script type="text/javascript" src="../../scripts/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxradiobutton.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var theme = getTheme();

            $("#jqxRadioButton").jqxRadioButton({ width: 250, height: 25, checked: true, theme: theme });
            $("#jqxRadioButton2").jqxRadioButton({ width: 250, height: 25, theme: theme });
            $("#jqxRadioButton3").jqxRadioButton({ width: 250, height: 25, theme: theme });
            $("#jqxRadioButton4").jqxRadioButton({ width: 250, height: 25, disabled: true, theme: theme });
            
            

            var clearLog = function () {
                var log = $('#events').find('span');
                if (log.length >= 2) {
                    log.remove();
                }
            }

            $("#jqxRadioButton").bind('change', function (event) {
                clearLog();
                var checked = event.args.checked;
                if (checked) {
                    $("#events").prepend('<div><span>Checked: 12 Months Contract</span></div>');
                }
                else $("#events").prepend('<div><span>Unchecked: 12 Months Contract</span></div>');
            });
            $("#jqxRadioButton2").bind('change', function (event) {
                clearLog();
                var checked = event.args.checked;
                if (checked) {
                    $("#events").prepend('<div><span>Checked: 6 Months Contract</span></div>');
                }
                else $("#events").prepend('<div><span>Unchecked: 6 Months Contract</span></div>');
            });
            $("#jqxRadioButton3").bind('change', function (event) {
                clearLog();
                var checked = event.args.checked;
                if (checked) {
                    $("#events").prepend('<div><span>Checked: 3 Months Contract</span></div>');
                }
                else $("#events").prepend('<div><span>Unchecked: 3 Months Contract</span></div>');
            });
        });
    </script>
</head>
<body class='default'>
    <div id='jqxWidget' style='font-family: Verdana Arial; font-size: 13px; width: 400px;'>
        <h3>
            House Contract</h3>
        <div style='margin-top: 10px;' id='jqxRadioButton'>
            12 Months Contract</div>
        <div style='margin-top: 10px;' id='jqxRadioButton2'>
            <span>6 Months Contract</span></div>
        <div style='margin-top: 10px;' id='jqxRadioButton3'>
            <span>3 Months Contract</span></div>
        <div style='margin-top: 10px;' id='jqxRadioButton4'>
            <span>1 Month Contract</span></div>
        <div style='margin-top: 10px;'>
            <div>
            Events:
            </div>
            <div id='events'>
            </div>
        </div>
    </div>
</body>
</html>
